<template>
 <div>
        <component :is="loadList[index]" :list="list" 
         :obj="form" :count="count"
      ></component>
      <div id="showTableFoot" style="height: 20px;"></div>
 </div>
</template>

<script setup>
import {ref,reactive,onMounted} from 'vue'
import {useRoute} from 'vue-router'
import yearcomeReport from './assay/yearcomeReport.vue'//全年营业总表
const loadList = {yearcomeReport}
import api from "@/http/service.js";

const route = useRoute()
const index = route.query.index
const url = route.query.url

const list = ref([])
const form = ref({})
const count = ref({})
form.value = Object.assign({},JSON.parse(route.query.data))
const tableList = async()=>{
  const data = await api.post(url,form.value)
  console.log(data);
  if (data.code == 200) {
    list.value = data.data.data
    count.value = data.data.to
  }
}
onMounted(() => {
  tableList()
})
</script>

<style scoped lang='less'>

</style>